-- GENERATED SPELL FOR [Tarren Mill Protector] --


function spell0_18093(pUnit, Event) --@Cleanse,n/a--
pUnit:FullCastSpellOnTarget(29380,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18093', 571, 1)
end

function spell1_18093(pUnit, Event) --@Cleave,n/a--
pUnit:FullCastSpellOnTarget(15496,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18093', 648, 1)
end

function spell2_18093(pUnit, Event) --@Concussion Blow,n/a--
pUnit:FullCastSpellOnTarget(32588,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18093', 5255, 1)
end

function spell3_18093(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17138,pUnit)
pUnit:RegisterEvent('Sorts_18093', 1500, 1)
end

function spell4_18093(pUnit, Event) --@Flash Heal,Heal--
pUnit:FullCastSpellOnTarget(17843,pUnit)
pUnit:RegisterEvent('Sorts_18093', 1500, 1)
end

function spell5_18093(pUnit, Event) --@Shadow Shield,n/a--
pUnit:FullCastSpellOnTarget(31976,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18093', 30267, 1)
end

function spell6_18093(pUnit, Event) --@Shadow Shock,n/a--
pUnit:FullCastSpellOnTarget(17234,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_18093', 554, 1)
end

function Sorts_18093(pUnit, Event)
local choix_sorts_18093 = math.random(0, 6)
if choix_sorts_18093 == 0 then
pUnit:RegisterEvent('spell0_18093', 1, 1)
end
if choix_sorts_18093 == 1 then
pUnit:RegisterEvent('spell1_18093', 1, 1)
end
if choix_sorts_18093 == 2 then
pUnit:RegisterEvent('spell2_18093', 1, 1)
end
if choix_sorts_18093 == 3 then
pUnit:RegisterEvent('spell3_18093', 1, 1)
end
if choix_sorts_18093 == 4 then
pUnit:RegisterEvent('spell4_18093', 1, 1)
end
if choix_sorts_18093 == 5 then
pUnit:RegisterEvent('spell5_18093', 1, 1)
end
if choix_sorts_18093 == 6 then
pUnit:RegisterEvent('spell6_18093', 1, 1)
end
end

function mob18093_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_18093', math.random(1500, 3000), 1)
end

function mob18093_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18093_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob18093_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(18093, 1, 'mob18093_Action')
RegisterUnitEvent(18093, 2, 'mob18093_Leave')
RegisterUnitEvent(18093, 3, 'mob18093_Kill')
RegisterUnitEvent(18093, 4, 'mob18093_Die')
